package cz.movie.subRenamerGUI;

import java.util.Locale;

import javax.swing.SwingUtilities;

public class Main {

	public static void main(String[] args) {
		String localeString;
		if (args != null && args.length == 1 && args[0] != null) {
			localeString = args[0];
		} else {
			localeString = System.getProperty("user.language");
		}
		try {
			Messages.init(new Locale(localeString));
		} catch (Exception e) {
			Messages.init();
		}
		runGraphicApp();
	}

	private static void runGraphicApp() {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {

				MainWindow mainWindow = new MainWindow(null);
				mainWindow.setVisible(true);
			}
		});
	}
}
